import Vue from 'vue'

const component = {
  name: 'componentFather',
  template: `<div :style="style">
    <slot></slot>

  </div>`,
  data () {
    return {
      style: {
        width: '200px',
        height: '200px',
        border: '1px solid #aaa'
      },
      value: 'component value'
    }
  }
}
new Vue({
  components: {
    CompOne: component
  },
  data () {
    return {
      value: '123'
    }
  },
  el: '#root',
  mounted () {

  },
  render (createElement) {
    return createElement('comp-one', {
      ref: 'comp'
    }, [createElement('span', {
      ref: 'span'
    }, this.value)])
  }
  // template: `<div>
  //             <comp-one ref="comp">
  //               <span>{{value}}</span>
  //             </comp-one>
  //           </div>`
})
